home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10968 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  36 lines

  1. Path: inforamp.net!ts28-10
  2. From: rmorin@inforamp.net (Randy Charles Morin)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Coding Standards
  5. Date: Tue, 12 Mar 96 02:46:18 GMT
  6. Organization: MiddleWorld SoftWare
  7. Message-ID: <4i2oi9$nfn@sam.inforamp.net>
  8. References: <4hj8ek$elu@sam.inforamp.net> <4hjh5c$elk@flood.weeg.uiowa.edu> <4hv2tm$e93@news.halcyon.com> <4i1ne4$g99@clarknet.clark.net>
  9. NNTP-Posting-Host: ts28-10.tor.inforamp.net
  10. X-Newsreader: News Xpress Version 1.0 Beta #4
  11.  
  12. In article <4i1ne4$g99@clarknet.clark.net>,
  13.    gusty@clark.net (Harlan Messinger) wrote:
  14. >Norm Bryar (normanb@halcyon.com) wrote:
  15. >: Except you can't put consts in a header for everyone to use and you
  16. >: can't bitwise-OR enum values.  #defines still have a place.    <===
  17. >
  18. >??? What about a header with the line,
  19. >
  20. >    extern const MyType MYCONST;
  21. >
  22. >and a single module with the global definition
  23. >
  24. >    const MyType MYCONST(/* Initialization parameters here */);
  25.  
  26. I'll add this to my repertoire.  Does this also work with enums.
  27.  
  28. Say:
  29.     extern enum team {HOME=0,VISITOR};
  30. and
  31.     enum team {HOME=0,VISITOR};
  32.  
  33. Don't spend a minute replying though, I can check it myself.
  34.  
  35. Agrivar
  36.